<template>
  <div class="america">
      <mvrangklist :songList="songList"></mvrangklist>
  </div>
</template>

<script>
import mvrangklist from '@/components/mvrangkList.vue'
export default {
  components:{mvrangklist},
  props:{},
  data(){
    return {
      songList:""
    }
  },
  watch:{},
  computed:{},
  methods:{},
  created(){
    this.$http("/top/mv", { params: { area: "欧美", limit: 50 } }).then(res => {
      //   console.log(res);
      res.data.data.forEach(val => {
          val.playCount = parseInt(val.playCount/10000);
      });
      console.log()
      let random = Math.floor(Math.random()*(res.data.data.length-30))
      res.data.data = res.data.data.slice(random,random+50);
      this.songList = res.data;
      
      console.log(this.songList);
    });
  },
  mounted(){}
}
</script>
<style lang="scss" scoped>
</style>